package com.crm.util;

import java.util.List;
import java.util.Random;

public class SuiJiDaLuanList {

	public <T> List<T> shuffle(List<T> list) {
        int size = list.size();
        Random random = new Random();

        for(int i = 0; i < size; i++) {

            int randomPos = random.nextInt(size);

            T temp = list.get(i);
            list.set(i, list.get(randomPos));
            list.set(randomPos, temp);
        }
        return list;
    }
}
